<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>课程事件表管理</title>
	<meta name="decorator" content="default" />
	<script type="text/javascript">
        function can(){
            var k=$("input[name='eventid']:checked").val();
            if (k<=0) return "";
            else {
                var chk_value =[];
                $('input[name="eventid"]:checked').each(function(){
                    chk_value.push($(this).val());
                });
                return  chk_value;
            }
        }
        function clsCheckbox(){
            $("[name = eventid]:checkbox").attr("checked", false);
        }
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").submit();
            return false;
        }
	</script>
</head>
<body>
<form:form id="searchForm" modelAttribute="event"
		   action="${ctx}/business/event/select4" method="post" class="breadcrumb form-search">
	<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}" />
	<input id="pageSize" name="pageSize" type="hidden"
		   value="${page.pageSize}" />
	<label>名称  ：</label>
	<form:input path="name" htmlEscape="false" maxlength="50"
				class="input-medium" />
	<form:select path="type" name="type">
		<form:options items="${dic:getBusDictList('event_type')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
	</form:select>
	&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit"
	value="查询" />
</form:form>

<tags:message content="${message}" />
<div style="overflow-x:scroll; ">
<table id="contentTable" class="table table-striped table-bordered table-condensed">
	<thead>
	<tr>
		<th>选择</th>
		<th>ID</th>
		<th>事件名称</th>
		<th>事件类型</th>
		<th>验收人</th>
		<th>事件级别</th>
		<th>完成类型</th>
		<th>是否在线</th>
		<th>事件频率</th>
		<th>需要完成次数</th>
		<th>是否点评</th>
	</tr>
	</thead>
	<tbody>
	<c:forEach items="${page.list}" var="event">
		<tr>
			<td><input id="eventid" name="eventid" value="${event.id}" text="${event.name}" type="radio"></td>
				<td>${event.id}</td>
				<td>${event.name}</td>
				<td>${dic:getLabelByValue(event.type, 'event_type')}</td>
				<td>${dic:getLabelByValue(event.accepter, 'event_accepter')}</td>
				<td>${dic:getLabelByValue(event.level, 'event_level')}</td>
				<td>${dic:getLabelByValue(event.finish, 'event_finish')}</td>
				<td>${dic:getLabelByValue(event.online, 'event_online')}</td>
				<td>${dic:getLabelByValue(event.frequency, 'event_frequency')}</td>
				<td>${event.times}</td>
				<td>${dic:getLabelByValue(event.whetherComment, 'event_comment')}</td>
		</tr>
	</c:forEach>
	</tbody>
</table>
</div>
<div class="pagination">${page}</div>
</body>
</html>